class registers:

    def __init__(self, numRegisters):
        self.numRegisters = numRegisters
        self.register = []
        for i in range(numRegisters):
            self.register.append(0)

    def setRegisters(self, array):
        self.register = array

    def readRegister(self,regNum):
        return self.register[regNum]

    def writeRegister(self,regNum,regValue):
        self.register[regNum] = regValue
        
    def returnSize(self):
        return self.numRegisters
    
    def printRegisters(self):
        for i in range(self.numRegisters):
            print (bin(self.register[i]))
            
    def getRegisterState(self):
        return self.register
      

#memory = registers(32)
#print (memory.writeRegister(5,3))
#print (memory.readRegister(5))